Remove the redundant call to vmx_intr_assit when we do a domain switch.
authoradsharma@los-vmm.sc.intel.com <adsharma@los-vmm.sc.intel.com>
Mon, 22 Aug 2005 18:04:05 +0000 (11:04 -0700)
committeradsharma@los-vmm.sc.intel.com <adsharma@los-vmm.sc.intel.com>
Mon, 22 Aug 2005 18:04:05 +0000 (11:04 -0700)
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
xen/arch/x86/vmx.c
xen/arch/x86/vmx_io.c
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/vmx.h

index f7c39b83462c01eb2759c3508d26f4f601cd96c6..c2647193fefdfeec0600d5a51a9a5d33d391b39a 100644 (file)
@@ -1713,7 +1713,6 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs regs)
         __vmx_bug(&regs);       /* should not happen */
     }
 
-    vmx_intr_assist(v);
     return;
 }
 
index cbc88deb8ba569100da7a88af381d3028f0d830f..cf770f8ddaae5fe1acc54e3eab425b798f7f7548 100644 (file)
@@ -631,12 +631,14 @@ static inline int irq_masked(unsigned long eflags)
     return ((eflags & X86_EFLAGS_IF) == 0);
 }
 
-void vmx_intr_assist(struct vcpu *v
+asmlinkage void vmx_intr_assist(
 {
     int intr_type = 0;
-    int highest_vector = find_highest_pending_irq(v, &intr_type);
+    int highest_vector;
     unsigned long intr_fields, eflags, interruptibility, cpu_exec_control;
+    struct vcpu *v = current;
 
+    highest_vector = find_highest_pending_irq(v, &intr_type);
     __vmread(CPU_BASED_VM_EXEC_CONTROL, &cpu_exec_control);
 
     if (highest_vector == -1) {
@@ -714,7 +716,6 @@ void vmx_do_resume(struct vcpu *d)
     ASSERT(!test_bit(ARCH_VMX_IO_WAIT, &d->arch.arch_vmx.flags));
 
     /* We always check for interrupts before resuming guest */
-    vmx_intr_assist(d);
 }
 
 #endif /* CONFIG_VMX */
index a2491612d76152a9089d00aa5cb68abbdfcc7a2c..911594b910c89d8d0da95bc8476fa25ee6e0497a 100644 (file)
@@ -140,6 +140,7 @@ ENTRY(vmx_asm_vmexit_handler)
         jnz 2f
 
 /* vmx_restore_all_guest */
+        call vmx_intr_assist
         call load_cr2
         .endif
         VMX_RESTORE_ALL_NOSEGREGS
index 0f24b15ca12b4b1ce2e326992b531787770eb687..3db22487bf95ceb0c090ab82fe71a644bf1dc038 100644 (file)
@@ -233,6 +233,7 @@ ENTRY(vmx_asm_vmexit_handler)
         jnz  2f 
 
 /* vmx_restore_all_guest */
+        call vmx_intr_assist
         call load_cr2
         .endif
         /* 
index 714969eb2e8db5190796e3286478286d975280d9..1307bbb9d0be318230666d03d91844176c07d379 100644 (file)
@@ -31,7 +31,7 @@
 extern void vmx_asm_vmexit_handler(struct cpu_user_regs);
 extern void vmx_asm_do_resume(void);
 extern void vmx_asm_do_launch(void);
-extern void vmx_intr_assist(struct vcpu *d);
+extern void vmx_intr_assist();
 
 extern void arch_vmx_do_launch(struct vcpu *);
 extern void arch_vmx_do_resume(struct vcpu *);